const Command = require("./Command");

class ExecuteJmxCommand extends Command {

    /**
     * 
     * @param {string} machineUuid 
     * @param {string} jmxUuid
     * @param {{testPlanName: string, jmxFilePaths: string[], initialThreadNumber: number, threadNumberIncrement: number}[]} testPlans 
     * @param {number} duration 
     * @param {number} maxRound 
     */
    constructor(machineUuid, jmxUuid, testPlans, duration, maxRound) {
        super(machineUuid);
        this.jmxUuid = jmxUuid;
        this.testPlans = testPlans;
        this.duration = duration;
        this.maxRound = maxRound;
    }

    _createCommandType() {
        return "executeJmx";
    }

    _createCommandData() {
        return {
            jmxUuid: this.jmxUuid,
            testPlans: this.testPlans,
            duration: this.duration,
            maxRound: this.maxRound,
        }
    }

}

module.exports = ExecuteJmxCommand;